{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% import "_macros.html" as macros %}

{% block title %}HelloBlog- Post{% endblock %}
{% block head %}
    {{ super() }}
    <script src="{{ url_for('static', filename='js/bootstrap.min.js')}}"></script>

{% endblock %}
{% block page_content %}
    {% include '_posts.html' %}
    <div class="container">
        <div class="row">
            <div class="col-md-8">
                <h4 id="comments">评论</h4>
                {% if current_user.can(Permission.COMMENT) %}
                    <div class="comment-form">
                        {{ wtf.quick_form(form) }}
                    </div>
                {% endif %}
                    {% include '_comments.html' %}
                {% if pagination %}
                    <div class="pagination">
                        {{ macros.pagination_widget(pagination, '.post', fragment='#comments', id=posts[0].id) }}
                    </div>
                {% endif %}
            </div>

        </div>
    </div>
{% endblock %}